package cn.yuanqiao.archive.storeRoom.mapper;

import cn.yuanqiao.archive.appManager.domain.DataScopeBase;
import cn.yuanqiao.archive.storeRoom.domain.BoxRecord;
import cn.yuanqiao.common.annotation.DataScope;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 档案盒记录Mapper接口
 * 
 * @author xy
 * @date 2023-07-08
 */
@Mapper
public interface BoxRecordMapper 
{
    /**
     * 查询档案盒记录
     * 
     * @param id 档案盒记录主键
     * @return 档案盒记录
     */
    public BoxRecord selectBoxRecordById(@Param("id") Long id, @Param("tableName")String tableName);

    /**
     * 查询档案盒记录列表
     * 
     * @param boxRecord 档案盒记录
     * @return 档案盒记录集合
     */
    @DataScope(deptAlias = "d", userAlias = "a",deptColumn = "DEPT_ID",userColumn = "CREATOR")
    public List<BoxRecord> selectBoxRecordList(@Param("dataScopeBase") DataScopeBase dataScopeBase, @Param("boxRecord") BoxRecord boxRecord);

    /**
     * 新增档案盒记录
     * 
     * @param boxRecord 档案盒记录
     * @return 结果
     */
    public int insertBoxRecord(BoxRecord boxRecord);

    /**
     * 修改档案盒记录
     * 
     * @param boxRecord 档案盒记录
     * @return 结果
     */
    public int updateBoxRecord(BoxRecord boxRecord);

    /**
     * 删除档案盒记录
     * 
     * @param id 档案盒记录主键
     * @return 结果
     */
    public int deleteBoxRecordById(Long id);

    /**
     * 批量删除档案盒记录
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBoxRecordByIds(@Param("ids") Long[] ids, @Param("code")String code);
}
